package BusLib;


import java.io.Serializable;
import java.util.*;


public class Route implements Serializable {
    int id_;
    String name_;
    ArrayList<Link> links_;
    int blocked_;


    /*
     * Constructori.
     */
    public Route() {
       id_=0;
       name_=null;
       links_=new ArrayList<Link>();
       blocked_=0;
    }

    public Route(int id, String name){
        id_=id;
        name_=name;
        links_=new ArrayList<Link>();
        blocked_=0;
    }



    /*
     * Metode.
     */

    public int Id(){ return id_;}
    public void SetId( int id ){ id_ = id;}
    public String Name(){ return name_;}
    public void SetName( String name){ name_ = name;}
    public int Blocked(){ return blocked_;}
    public void SetBlocked( int blocked ){ blocked_ = blocked;}


       // Metode ce acceseaza lista de linkuri.
    public List<Link> Links() { return links_; }
    public void AddLink(Link link) { links_.add(link);  }
    public void ContainsLink(Link link) { links_.contains(link); }
    public void DeleteLink(Link link) { links_.remove(link); }
    public void ClearLinks(){ links_.clear(); }


}
